<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>教师信息管理</title>
  <link rel="stylesheet" href="/css/layui.css">
  <link rel="stylesheet" href="/css/dpx.css">
  <script src="/js/jquery-3.7.1.min.js"></script>
  <style>
    .layui-input-wrap .layui-input[type=number] {
      -webkit-appearance: none; /* Chrome, Safari */
      -moz-appearance: textfield; /* Firefox */
      appearance: none; /* 标准 */
    }

    .layui-table-init {
      user-select: none;
      -webkit-user-select: none; /* Safari */
    }
  </style>
</head>
<body>
<!DOCTYPE html>

<div class="container">
  <!-- 教师信息管理标题 -->
  <div class="layui-row">
    <div class="layui-col-xs12">
      <h1 style="text-align: center">教师信息管理</h1>
    </div>
  </div>

  <!-- 工具栏按钮 -->
  <div class="layui-row">
    <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"
            onclick="showTeacherDlg(); return false;" aria-label="新增教师">
      <i class="layui-icon layui-icon-addition"></i> 新增教师
    </button>

    <button type="button" class="layui-btn layui-btn-sm layui-btn-normal layui-bg-red"
            onclick="deleteConfirm();" style="float:right;" aria-label="删除教师">
      <i class="layui-icon layui-icon-delete"></i> 删除教师
    </button>
  </div>

  <!-- 查询框 -->
  <div class="layui-row">
    <div class="queryBox">
      <form class="layui-form" id="queryForm">
        <ul class="query-inline">
          <!-- 职工号查询框 -->
          <li class="layui-input-group">
            <div class="layui-input-prefix">职工号</div>
            <input type="text" placeholder="请输入职工号" class="layui-input" name="sno" id="query-sno" aria-label="职工号查询" />
          </li>

          <!-- 姓名查询框 -->
          <li class="layui-input-group">
            <div class="layui-input-prefix">姓名</div>
            <input type="text" placeholder="请输入姓名" class="layui-input" name="name" id="query-name" aria-label="姓名查询" />
          </li>

          <!-- 性别查询框 -->
          <li class="layui-input-group">
            <div class="layui-input-prefix">性别</div>
            <select name="sex" class="layui-input" id="query-sex" aria-label="性别查询">
              <option value="">请选择性别</option>
              <option value="男">男</option>
              <option value="女">女</option>
            </select>
          </li>

          <!-- 职位查询框 -->
          <li class="layui-input-group">
            <div class="layui-input-prefix">职位</div>
            <input type="text" placeholder="请输入职位" class="layui-input" name="position" id="query-position" aria-label="职位查询" />
          </li>

          <!-- 查询按钮 -->
          <li class="layui-input-group">
            <button type="button" class="layui-btn layui-btn-normal"
                    onclick="search(); return false;" style="margin-left: 20px;" aria-label="查询教师">
              查询
            </button>
          </li>
        </ul>
      </form>
    </div>
  </div>

  <!-- 教师列表表格 -->
  <div class="layui-row">
    <div class="layui-col-xs12">
      <table id="tbTeacher" lay-filter="tbTeacher"></table>
    </div>
  </div>

  <script type="text/html" id="editTemplate">
    <div class="layui-clear-space">
      <a class="layui-btn layui-btn-xs" lay-event="edit" aria-label="编辑教师">编辑</a>
    </div>
  </script>

  <!-- 新增教师表单 -->
  <form class="layui-form dlgcontainer" id="teaForm" style="display: none;">
    <div class="demo-reg-container">
      <!-- 姓名 -->
      <div class="layui-form-item">
        <label for="teacher-name">姓名</label>
        <input type="text" name="name" id="teacher-name" value="" lay-verify="required" placeholder="姓名" autocomplete="off" class="layui-input" aria-label="姓名" />
      </div>

      <!-- 性别 -->
      <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
          <input type="radio" name="sex" value="男" title="男" checked>
          <input type="radio" name="sex" value="女" title="女">
        </div>
      </div>

      <!-- 职位 -->
      <div class="layui-form-item">
        <label for="teacher-position">职位</label>
        <input type="text" name="position" id="teacher-position" value="" lay-verify="required" placeholder="职位" autocomplete="off" class="layui-input" aria-label="职位" />
      </div>

      <!-- 职工号 -->
      <div class="layui-form-item">
        <label for="teacher-sno">职工号</label>
        <input type="number" name="sno" id="teacher-sno" value="" lay-verify="required|number" placeholder="职工号" autocomplete="off" class="layui-input" min="1" max="9223372036854775807" aria-label="职工号" />
      </div>

      <!-- 提交按钮 -->
      <div class="layui-form-item">
        <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="demo-add-teacher" id="btnOk" aria-label="确认新增教师">确认</button>
      </div>
    </div>
  </form>

</div>

<script src="/js/layui.js"></script>
<script src="/pagejs/dpx01.js"></script>
</body>
</html>
